package com.Entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Favoritetopic entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "favoritetopic", catalog = "monitor")
public class Favoritetopic implements java.io.Serializable {

	// Fields

	private Integer favoriteTopicId;
	private Integer userId;
	private Long topicId;
	private Timestamp favoriteTime;

	// Constructors

	/** default constructor */
	public Favoritetopic() {
	}

	/** minimal constructor */
	public Favoritetopic(Integer favoriteTopicId) {
		this.favoriteTopicId = favoriteTopicId;
	}

	/** full constructor */
	public Favoritetopic(Integer favoriteTopicId, Integer userId,
			Long topicId,Timestamp favoriteTime) {
		this.favoriteTopicId = favoriteTopicId;
		this.userId = userId;
		this.topicId = topicId;
		this.favoriteTime=favoriteTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "favoriteTopicId", unique = true, nullable = false)
	public Integer getFavoriteTopicId() {
		return this.favoriteTopicId;
	}

	public void setFavoriteTopicId(Integer favoriteTopicId) {
		this.favoriteTopicId = favoriteTopicId;
	}

	@Column(name = "userId")
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "topicId")
	public Long getTopicId() {
		return this.topicId;
	}

	public void setTopicId(Long topicId) {
		this.topicId = topicId;
	}
	
	@Column(name = "favoriteTime", length = 19)
	public Timestamp getFavoriteTime() {
		return this.favoriteTime;
	}

	public void setFavoriteTime(Timestamp favoriteTime) {
		this.favoriteTime = favoriteTime;
	}


}